//
//  AppDelegate.h
//  UUCharterSupplier
//
//  Created by ZhangAo on 09/01/2018.
//  Copyright © 2018 UUCharter. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSUInteger, UULogoutReasonType) {
    UULogoutReasonTypeNone,
    UULogoutReasonTypeForceLogout = 1,  // 强制登出
    UULogoutReasonTypeTokenInvalid,     // token失效
};

typedef NS_ENUM(NSUInteger, UUTabBarType) {
    UUTabBarTypeHome,
    UUTabBarTypeOrder,
    UUTabBarTypeNotification,
    UUTabBarTypeMyInfo,
};

#define NOTIFICATION_USER_NEED_LOGOUT           (@"NOTIFICATION_USER_NEED_LOGOUT")
#define LOGOUT_REASON_KEY                       (@"LOGOUT_REASON_KEY")

#define GetAppDelegate()        ((AppDelegate *)[[UIApplication sharedApplication] delegate])

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (nonatomic, strong) UIWindow *window;
@property (nonatomic, weak, readonly) UITabBarController *tabBarController;

/**
 进入首页
 */
- (void)presentHome;

/**
 收到了消息
 */
- (void)receiveMessage:(NSDictionary *)message;

@end

